package com.sdgakj.enums;

public enum EnumIsDelete {
	NOTDELETE("0", "未删除"), DELETED("1", "已删除");

	private String code;

	private String name;

	private EnumIsDelete(String code, String name) {
		this.code = code;
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public static EnumIsDelete getEnum(String value) {
		for (EnumIsDelete e : EnumIsDelete.values()) {
			if (value.equals(e.getCode())) {
				return e;
			}
		}
		return null;
	}
}
